﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using NASA.BeAMartian.Plugin;

namespace NASA.BeAMartian.Helper
{
    public class XapLoaderHelper
    {
        /// <summary>
        /// The singleton XapLoaderHelper.
        /// </summary>
        private static XapLoaderHelper singleton = null;

        /// <summary>
        /// Get the Singleton ApplicationContext
        /// </summary>
        public static XapLoaderHelper Instance
        {
            get
            {
                if (XapLoaderHelper.singleton == null)
                {
                    XapLoaderHelper.singleton = new XapLoaderHelper();
                }

                return XapLoaderHelper.singleton;
            }
        }

        /// <summary>
        /// Private due to singleton. Use XapLoaderHelper.Instance.
        /// </summary>
        private XapLoaderHelper() { }

        private XapLoader xapLoader = new XapLoader() { MaxAttempts = 1 };

        public XapLoader XapLoader
        {
            get { return this.xapLoader; }
        }
    }
}
